#include "TcpServer.hpp"
#include <memory>

int main(int args, char *argv[])
{
    // 检查使用格式
    if (args != 2)
    {
        LOG(INFO, "Usage: %s localport\n", argv[0]);
        exit(0);
    }

    // 获取localport并传递给TcpServer构造
    uint16_t localport = std::stoi(argv[1]);
    std::unique_ptr<TcpServer> utsp = std::make_unique<TcpServer>(localport);

    utsp->Init();
    utsp->Start();

    return 0;
}
